<template>
	<view>
		<ker-city-select :show.sync="showCity" @back_city="cityClick"></ker-city-select>
		<button class="btn" @click="showCity = true" plain="true" type="default">选择城市</button>
		<view class="city">
			选择城市为:<text class="city_name">{{city}}</text>
		</view>
	</view>
</template>
<script>
	import kerCitySelect from '../../components/ker-city-select/ker-city-select.vue'
export default {
	data() {
		return {
			showCity:false,
			city:''
		};
	},
	components:{
		kerCitySelect
	},
	methods: {
		cityClick(item){
			if(item){
				this.showCity = false
				this.city = item.cityName
				console.log(item)
			}
		}
	},
	mounted() {}
};
</script>
<style lang="scss" scoped>
	.btn{
		width: 200px;
		margin: 20px auto;
	}
	.city{
		color: #999;
		.city_name{
			color: #007AFF;
		}
	}
	
</style>
